package com.cxb;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;
import com.cxb.receiver.PowerStateReceiver;

public class PowerOffActivity extends BaseActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		if (PowerStateReceiver.IsPowerConnected()) {
			Toast.makeText(this, getString(R.string.powernotify),
					Toast.LENGTH_LONG).show();
		} else {
			Intent i = new Intent(this, GuardActivity.class);
			startActivity(i);
		}
		finish();
	}

}
